package com.shopoo.oauth.dto.clientobject;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description:
 * @Auther: limy66
 * @Date: 2021/08/30/15:43
 */
@Data
public class UserDetailDTO implements Serializable {

    private static final long serialVersionUID = 125491236222311452L;

    @ApiModelProperty("用户角色列表")
    private List<String> roles;
    private String icon;
    private List<MenuCO> menuCOS;
    private String username;
    private String userId;

    public UserDetailDTO(Map<String, Object> map) {
        this.username = (String)map.get("user_name");
        this.userId = (String)map.get("userId");
        this.roles = (List<String>)map.get("authorities");
    }
}
